﻿package 
{
	import flash.display.Sprite;
	import flash.display.Graphics;
	import flash.display.Shape;

	/*******************
	*
	*@Author Luanluan
	*
	*******************/
	public class World extends Sprite
	{
		private var Arr:Array=[];
		
		private var c:Shape=new  Shape();
		private var g:Graphics = c.graphics;
		
		public function World(row:int,col:int)
		{
			g.lineStyle(1,0xdddddd);
			for (var i:int=0; i<row; i++)
			{
				Arr[i]=[]
				
				g.moveTo(0,i*Config._SIZE);
				g.lineTo((col-1)*Config._SIZE,i*Config._SIZE);
				
				for (var j:int=0; j<col; j++)
				{
					Arr[i][j]=0;
					
					g.moveTo(j*Config._SIZE,0);
					g.lineTo(j*Config._SIZE,(row-1)*Config._SIZE);
				}
			}
			
			addChild(c);
		}
		public function  WorldArr():Array
		{
			return this.Arr;
		}

	}

}